//
//  P1025.cpp
//  Algorithm
//
//  Created by 刘锦程 on 2023/9/25.
//

#include <stdio.h>
#include<iostream>
using namespace std;
int n,k,ans,a[202][10],re[8];
void dfs(int num,int step){
    //if(a[num][step]) return a[num][k];
    if(step==k){
        re[step+1]=num;
        ans++;
        return;
    }
    for(int i=re[step-1];i<=num/(k-step+1);i++){
            re[step]=i;
            dfs(num-i,step+1);
            re[step]=0;
    }
    return;
}



int P1025ans(){
    scanf("%d%d",&n,&k);
    re[0]=1;
    dfs(n,1);
    cout<<ans<<endl;
    return 0;
}
